<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class ModifyMemberInformation extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('member_informations', function (Blueprint $table) {
            $table->integer('member_id')->unsigned()->comment('用户 ID')->change();

            $table->string('company')->comment('公司全名')->change();

            $table->string('legal', 60)->comment('法人名称')->change();
            $table->boolean('legal_gender')->comment('法人性别')->change();
            $table->integer('legal_identity_a')->unsigned()->comment('法人身份证 A 面')->change();
            $table->integer('legal_identity_b')->unsigned()->comment('法人身份证 B 面')->change();

            $table->string('region')->comment('地区')->change();
            $table->string('address')->comment('详细地址')->change();
            $table->string('contact_person', 60)->comment('联系人姓名')->change();
            $table->string('contact_phone', 30)->comment('联系人电话')->change();
            $table->string('contact_email', 60)->default('')->comment('联系人邮件箱')->change();

            $table->integer('business_license')->unsigned()->comment('营业执照')->change();

            $table->integer('province_id')->unsigned()->comment('省份 ID');
            $table->integer('city_id')->unsigned()->comment('市区 ID');
            $table->integer('country_id')->unsigned()->comment('乡镇 ID');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
